package main

import (
	"fmt"
	"time"
)

func main() {
	var a [10]int
	for i :=0; i<1000; i++ {
		go func(i int) {
			//十个线程，每个线程不断的打印
			for {
				fmt.Printf("Hello from "+
					"goroutine %d\n", i)
				//a[i]++
			}
		}(i)
	}
	time.Sleep(time.Minute)
	fmt.Println(a)
}
